#! /usr/bin/env python3
import keyword

# 输出所有的关键字，每行5个，关键词以10字符左对齐
idx = 0
maxlen = 0
for kw in keyword.kwlist:
    if (idx < 4):
        idx += 1
        print(kw.ljust(9), end=" ")
    else:
        idx = 0
        print(kw.ljust(9))
    if (len(kw) > maxlen):
        maxlen = len(kw)

print("\n\nthe max keyword length is %d" % (maxlen))
